<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class HostInfo extends Model
{
    protected $table = 'saturn_host_info';
     //查询所有
    public function getAll($where='', $select=''){
        $model = DB::table($this->table);
        if(!empty($select)) $model->select($select);
        if(!empty($where)) $model->where($where);
        return json_decode(json_encode($model->get()), true);
    }
}
